#include "main.h"
#include "clock.h"
#include "timer.h"
#include "usart.h"
#include "config.h"
#include "encoder.h"
#include "task_app.h"
#include "encoder_app.h"
#include "read_table.h"
  
void main (void)
{   
  WDTCTL = WDTPW + WDTHOLD;   //�رտ��Ź�

  Run_Clock_Set();            //ϵͳʱ�ӳ�ʼ��
  Encoder_Init();             //EncoderӲ���˿ڳ�ʼ��
  TimerA0_Init();             //��ʱ��A0��ʼ��
  TimerB0_Init();             //��ʱ��B0��ʼ��
  Uart0_Init();               //����0��ʼ��
  
  Read_System_Config();       //��ȡϵͳ���ò���
  Table_Para_Init();          //��������ʼ��
  Encoder_Data_Update(&Encoder_Data);
  
  _EINT();                    //��ȫ���ж�
  
printf("main test\r\n");

  while(1)
  {    
    if(!Query_Prio(&Task_Prio))
    {
      Sleep_Clock_Set();
      TimerB0_Irq_Set(1);
      __bis_SR_register(LPM3_bits + GIE)
    }
  }
}

void test2_demo(void)
{
  printf("123456789\r\n");
  printf("123456789\r\n");
}











